#include "PhysFSCommon.h"

#ifndef _PHYSFS_PHYFS_SYSTEM_H_
#define _PHYSFS_PHYFS_SYSTEM_H_

namespace Hiranipra {
	namespace Platform {
		namespace IO {

			class PhysFSSystem : implements IFileSystem
			{
			public:
				PhysFSSystem();
				virtual ~PhysFSSystem();

				virtual const wstring GetSeparator() const;

				virtual void Setup( const wstring& appPath );

				virtual vector<wstring> GetSearchPaths() const;
				virtual void AddSearchPath( const wstring& path, bool insertAtHead );
				virtual void RemoveSearchPath( const wstring& path );

				virtual const wstring GetWritePath() const;
				virtual void SetWritePath( const wstring& writePath );

				virtual bool MakeDirectory( const wstring& path );
				virtual bool Delete( const wstring& path );

				virtual IFileStream* OpenRead( const wstring& path );
				virtual IFileStream* OpenWrite( const wstring& path );
				virtual IFileStream* OpenAppend( const wstring& path );

				virtual bool Exists( const wstring& path );
				virtual bool IsDirectory( const wstring& path );
				virtual bool IsSymbolicLink( const wstring& path );
				virtual int64 GetLastModifiedTime( const wstring& path );

				virtual vector<wstring> EnumerateFiles( const wstring& path );
				virtual vector<wstring> EnumerateFiles( const wstring& path, const wstring& wildcard, bool caseSensitive );

			};

		}
	}
}

#endif // _PHYSFS_PHYFS_SYSTEM_H_
